The content of a single frame in a modern graphics application continues to expand as graphics processing units (GPUs) increase in capability. This can lead to errors and performance problems that are difficult to analyze in real time while the application renders the final image. The use of multiple rendering targets, composited to construct the final image, only contributes to the difficulty of debugging and performance tuning.
A previous frame capture system describes a system for multi-threaded application programming interface (API) stream capture and single-threaded API stream replay. During API stream capture, each thread is given an object into which it can store a tokenized API stream. Each tokenized function or method is executed in a single thread.
This system is sufficient for capturing and replaying APIs where the API operates to process global data that are explicitly specified either as function or method parameters, or using a method call. In the latter case, the object invoking the method is explicit. However, the system is insufficient, particularly from a performance perspective, when data have thread affinity, or when the API makes use of data that is implicitly tied to a thread. In the worst case scenario, the single-threaded replay mechanism might need to set thread specific state for each function or method that is executed. This would lead to very poor replay performance.